package com.zw.mizhe.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * 顶部tab实体类
 */

public class HomeBean {
    private String name;
    private String requestType;
    private String requestPath;


    public HomeBean() {
    }

    public HomeBean(String name, String type) {
        this.name = name;
        this.requestType = type;
    }

    public HomeBean(String name, String type, String path) {
        this.name = name;
        this.requestType = type;
        this.requestPath = path;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRequestPath() {
        return requestPath;
    }

    public void setRequestPath(String requestPath) {
        this.requestPath = requestPath;
    }


    public String getRequestType() {
        return requestType;
    }

    public void setRequestType(String requestType) {
        this.requestType = requestType;
    }


    public static List<HomeBean> getHomeData(int type) {
        List<HomeBean> data = null;
        switch (type) {
            case 1:
                data = getTeMaiData();
                break;
            case 2:
                data = getBaoYouData();
                break;
            case 3:
                data = getPinTuanData();
                break;
        }
        return data;
    }


    /**
     * 1 表示
     */

    //特卖
    public static final String PATH_MZ_TEMAI = "item/mz_temai/v2";
    public static final String PATH_MZ_TEMAI_CAT = "item/mz_temai_cat/v2";
    //9.9包邮path
    public static final String PATH_MARTGOODS = "martgoods/freeship";
    //拼团
    public static final String PATH_MIZHE_ITEM_GET = "mizhe_item_get";
    public static final String PATH_MIZHE_CATE_ITEM_GET = "fightgroup/mizhe_cate_item_get";

    /**
     * 特卖数据
     *
     * @return
     */
    public static List<HomeBean> getTeMaiData() {
        ArrayList<HomeBean> data = new ArrayList<>();
        data.add(new HomeBean("上新", "0-1", PATH_MZ_TEMAI));
        data.add(new HomeBean("女装", "nvzhuang", PATH_MZ_TEMAI_CAT));
        data.add(new HomeBean("鞋包", "xiebao", PATH_MZ_TEMAI_CAT));
        data.add(new HomeBean("居家", "jujia", PATH_MZ_TEMAI_CAT));
        data.add(new HomeBean("美妆", "meizhuang", PATH_MZ_TEMAI_CAT));
        data.add(new HomeBean("美食", "meishi", PATH_MZ_TEMAI_CAT));
        data.add(new HomeBean("母婴童装", "muying", PATH_MZ_TEMAI_CAT));
        data.add(new HomeBean("昨日卖完", "-1", PATH_MZ_TEMAI));
        data.add(new HomeBean("下周预告", "next", PATH_MZ_TEMAI_CAT));
        return data;
    }

    /**
     * 包邮数据
     *
     * @return
     */
    public static List<HomeBean> getBaoYouData() {
        ArrayList<HomeBean> data = new ArrayList<>();
        data.add(new HomeBean("精选", "0_3999", PATH_MARTGOODS));
        data.add(new HomeBean("9.9包邮", "0_999", PATH_MARTGOODS));
        data.add(new HomeBean("19.9包邮", "1000_1999", PATH_MARTGOODS));
        data.add(new HomeBean("最后疯抢", "0_3999-last", PATH_MARTGOODS));
        return data;
    }

    public static List<HomeBean> getPinTuanData() {
        ArrayList<HomeBean> data = new ArrayList<>();
        data.add(new HomeBean("上新", "0-0", PATH_MIZHE_ITEM_GET));
        data.add(new HomeBean("食品", "fooddrink-0", PATH_MIZHE_CATE_ITEM_GET));
        data.add(new HomeBean("女装", "dress-0", PATH_MIZHE_CATE_ITEM_GET));
        data.add(new HomeBean("美妆", "beauty-0", PATH_MIZHE_CATE_ITEM_GET));
        data.add(new HomeBean("居家", "40-house-0", PATH_MIZHE_CATE_ITEM_GET));
        data.add(new HomeBean("母婴", "momthings-0", PATH_MIZHE_CATE_ITEM_GET));
        data.add(new HomeBean("童装", "children_wear-0", PATH_MIZHE_CATE_ITEM_GET));
        data.add(new HomeBean("生鲜", "fruit-0", PATH_MIZHE_CATE_ITEM_GET));
        data.add(new HomeBean("下周预告", "1-0", PATH_MIZHE_ITEM_GET));
        return data;
    }

}
